﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZuesControls.Commons;

namespace ZuesControls.Interfaces
{
    public interface  ILoading
    {
        Task<OperateResult<T>> InvokeAsync<T>(Func<CancellationToken, Task<OperateResult<T>>> func, CancellationToken cancellationToken = default);

        Task<OperateResult> InvokeAsync(Func<CancellationToken, Task<OperateResult>> func, CancellationToken cancellation = default);

        void HideLoading();

        void ShowLoading();
    }


}
